#define _CRT_SECURE_NO_WARNINGS 1
#include"Dlist.h"


int main()
{
	ListNode* plist = ListInit();

	ListPushBack(plist, 1);
	ListPushBack(plist, 2);
	ListPushBack(plist, 3);
	ListPushBack(plist, 4);
	ListPushFront(plist, 0);
	ListPrint(plist);


	ListPopBack(plist);
	ListPrint(plist);

	ListPopFront(plist);
	ListPrint(plist);


	ListNode* pos = FindListNode(plist, 2);
	if (pos)
	{
		ListInsert(plist, pos, 20);
	}
	ListPrint(plist);
	
	pos = FindListNode(plist, 20);
	if (pos)
	{
		ListErase(plist, pos);
	}
	ListPrint(plist);


	return 0;
}